<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="jquery-3.3.1.min.js"></script>
</head>

<body>
    <p>JavaScript程序设计</p>
    <div id="Odiv">
        <p id="p1">什么是JavaScript</p>
        <p>JavaScript是一门功能强大的编程语言</p>
        <p>第一部分 JavaScript概述</p>
        <p>JavaScript的发展历史</p>
    </div>
    <button onclick="javascript:delp();" value="删除p元素">删除p元素</button>
    <script>
        function delp() {
            var pa = document.getElementById("Odiv");
            var p1 = document.getElementById("p1");
            pa.removeChild(p1);
            p1.parentNode.removeChild(p1);
        }
    </script>
</body>

</html>